package com.yang.service.api;

import com.yang.service.model.vo.ProductVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by baipan
 * Date: 11:05
 */
@FeignClient(name = "${zhy.endpoint.basedata}")
public interface ProductService {
    /**
     * 根据店铺Id获取所有的商品
     */
    @GetMapping("product")
    List<ProductVO> selectAllProductByShopId(@RequestParam(value = "shopId") String shopId);

    /**
     * 根据商品Id获取细节
     */
    @GetMapping("product/details")
    ProductVO getProductDetailsByProductId(@RequestParam(value = "productId") String productId);
}
